﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;
using System.Collections.Generic;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2023-03-19 19:28
    /// 描 述：品牌管理实体类
    /// </summary>
    [Table("brand_info")]
    public class BrandInfoEntity : BaseEntity
    {
        /// <summary>
        /// 品牌名称
        /// </summary>
        /// <returns></returns>
        public string brand_name { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        /// <returns></returns>
        public string telephone { get; set; }
        /// <summary>
        /// 品牌描述
        /// </summary>
        /// <returns></returns>
        public string brand_desc { get; set; }
        /// <summary>
        /// 品牌状态,0下架,1启用
        /// </summary>
        /// <returns></returns>
        public int? brand_status { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        /// <returns></returns>
        public int? brand_sort { get; set; }
        /// <summary>
        /// 最后修改时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? modified_time { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? create_time { get; set; }

        [JsonConverter(typeof(StringJsonConverter))]
        public long? tenant_id { get; set; }

        [NotMapped]
        public string models { get; set; }
    }

    public class BrandModelZtree
    {
        public string value { get; set; }

        public string label { get; set; }

        public List<BrandModelZtree> children = new List<BrandModelZtree>();
    }

    public class BrandModel
    {
        public string value { get; set; }

        public string label { get; set; }
    }
}
